/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.iduxs.collect.frame.style2.collect;

import org.jdesktop.beansbinding.Converter;

/**
*
* @author cao da bing
*/
public class IntegerConverter extends Converter{

        @Override
        public Object convertForward(Object value) {
            
            return value.toString();
        }

        @Override
        public Object convertReverse(Object arg) {
           Integer value;
           if(arg == null || arg.toString().trim().equals("")) value = -1;
            value = Integer.parseInt(arg.toString());
            return value;
        }

}
